# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=jaq
pkgver=1.2.0
pkgrel=0
pkgdesc="jq clone focused on correctness, speed and simplicity"
url="https://github.com/01mf02/jaq"
arch="all"
license="MIT"
makedepends="cargo cargo-auditable"
source="https://github.com/01mf02/jaq/archive/v$pkgver/jaq-$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/jaq -t "$pkgdir"/usr/bin/
}

sha512sums="
10b98ea4e147378fbc37b9e76c41dc79b88f65cc446ceb8ad444d8d2c558b4d73b30ecee01cea2dbcd96d8b4b46cb0f5811ae7a71423cce88693cc51f9aba271  jaq-1.2.0.tar.gz
"
